<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>需求产品添加</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <script src="/layui/jquery-3.5.1.min.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>

<body>

<!--<blockquote class="layui-elem-quote layui-text">
    鉴于小伙伴的普遍反馈，先温馨提醒两个常见“问题”：1. <a href="/doc/base/faq.html#form" target="_blank">为什么select/checkbox/radio没显示？</a> 2. <a href="/doc/modules/form.html#render" target="_blank">动态添加的表单元素如何更新？</a>
</blockquote>-->
<!--<h3 th:text="${dictionary.getvalue()}"></h3>-->
<!-- <option th:each="suppiler:${suppilers}" th:value="${suppiler.id}" th:text="${suppiler.name}"></option>-->
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>客户产品演示</legend>
</fieldset>

<form class="layui-form" action="/customerInformation/addProductByCustomer" method="post">
    <!-- <input name="supplierId" type="hidden"  th:value="${customerId}">-->
    <div class="layui-inline">
        <labeld  class="layui-form-label">所属公司</labeld>
        <div class="layui-input-inline">
            <select  name="supplier.id"  lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="supplier:${suppliers}" th:value="${supplier.id}" th:text="${supplier.name}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <labeld  class="layui-form-label">品类</labeld>
        <div class="layui-input-inline">
            <select id="type" name="dictionaryA.id"  lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="productTypeA:${productTypeAMaps}" th:value="${productTypeA.id}" th:text="${productTypeA.value}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <labeld  class="layui-form-label">品名/品种</labeld>
        <div class="layui-input-inline">
            <select  name="dictionaryB.id"  lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="productTypeB:${productTypeBMaps}" th:value="${productTypeB.id}" th:text="${productTypeB.value}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label  class="layui-form-label">牌号/型号/代码</label>
        <div class="layui-input-inline">
            <input value="324324" type="text" name="model"  placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label  class="layui-form-label">产品来源</label>
        <div class="layui-input-inline">
            <input value="324324" type="text" name="goodsSource"  placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label  class="layui-form-label">产品流向</label>
        <div class="layui-input-inline">
            <input name="goodsTo" value="324324" type="text"  placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label  class="layui-form-label">数量</label>
        <div class="layui-input-inline">
            <input name="number" value="324324" type="text"  placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-inline">
        <labeld  class="layui-form-label">数量单位</labeld>
        <div class="layui-input-inline">
            <select id="type1" name="dictionaryC.id"  lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="productTypeC:${productTypeCMaps}" th:value="${productTypeC.id}" th:text="${productTypeC.value}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">包装方式</label>
        <div class="layui-input-inline">
            <select name="dictionaryD.id" lay-verify="required" lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="productTypeD:${productTypeDMaps}" th:value="${productTypeD.id}" th:text="${productTypeD.value}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">相关标准</label>
        <div class="layui-input-inline">
            <select name="dictionaryE.id" lay-verify="required" lay-search="">
                <!--  <option value="">直接选择或搜索选择</option>-->
                <option th:each="productTypeE:${productTypeEMaps}" th:value="${productTypeE.id}" th:text="${productTypeE.value}"></option>-->
                <!-- <option value="1">layer</option>
                 <option value="2">form</option>-->
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入内容" class="layui-textarea" name="remarks"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="submit" class="layui-btn" lay-submit="" lay-filter="demo1"/>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>



<script src="/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    $(function () {
        $("#type1").change(function () {
            /*var t = $(".type").val();*/
            alert("1111");
        });
    });
</script>
<script>
    layui.use('upload', function() {
        var $ = layui.jquery
            , upload = layui.upload;
        //选完文件后不自动上传
        /* upload.render({
             elem: '#test8'
             ,url: 'http://localhost:8080/customerInformation/enterpriseBasicInformation' //改成您自己的上传接口
             ,auto: false
             ,accept: 'file'
             //,multiple: true
             ,bindAction: '#test9'
             ,done: function(res){
                 layer.msg('上传成功');
                 console.log(res)
             }
         });*/
    })
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form,
            layer = layui.layer,
            layedit = layui.layedit,
            laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        /*  var editIndex = layedit.build('LAY_demo_editor');
          form.on('submit(demo1)', function(data) {
              var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
              parent.layer.close(index); //再执行关闭

          });*/
        //表单取值
        layui.$('#LAY-component-form-getval').on('click', function() {
            var data = form.val('example');
            alert(JSON.stringify(data));
        });

    });

</script>

</body>

</html>
